<div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
    <table>
        <tbody>
        <volist name="userList" id="list">
            <tr data-id="{$list['id']}">
                <td class="sign">
                    <div style="width: 24px;"><i class="ico-check"></i></div>
                </td>
                <td align="left" class="">
                    <div style="text-align: center; width: 40px;">{$list.id}</div>
                </td>
                <td align="left" class="">
                    <div style="text-align: center; width: 150px;">{$list.nickname}</div>
                </td>
                <td align="left" class="">
                    <div style="text-align: center; width: 50px;"><a class="btn blue" href="{:U('Admin/Discuz/reply',array('id'=>$list['id']))}"><i ></i>{$list.title}</a></div>
                </td>
                <td align="left" class="">
                    <div style="text-align: center; width: 550px;">{$list.content}</div>
                </td>
                <td align="center" axis="col0">
                  <div style="text-align: center; width: 30px;">
                    <if condition='$list[elite] eq 1'>
                      <span class="yes" onClick="changeTableVal('dis_post','id','{$list.id}','elite',this)" ><i class="fa fa-check-circle"></i>是</span>
                      <else />
                      <span class="no" onClick="changeTableVal('dis_post','id','{$list.id}','elite',this)" ><i class="fa fa-ban"></i>否</span>
                    </if>
                  </div>
                </td>
                <td align="center" axis="col0">
                  <div style="text-align: center; width: 30px;">
                    <if condition='$list[top] eq 1'>
                      <span class="yes" onClick="changeTableVal('dis_post','id','{$list.id}','top',this)" ><i class="fa fa-check-circle"></i>是</span>
                      <else />
                      <span class="no" onClick="changeTableVal('dis_post','id','{$list.id}','top',this)" ><i class="fa fa-ban"></i>否</span>
                    </if>
                  </div>
                </td>         
                <td align="left" class="">
                    <div style="text-align: center; width: 250px;">{$list.subTime}</div>
                </td>
               <td align="center" axis="col0">
                  <div style="text-align: center; width: 50px;">
                    <if condition='$list[recycle] eq 1'>
                      <span class="yes" onClick="changeTableVal('dis_post','id','{$list.id}','recycle',this)" ><i class="fa fa-check-circle"></i>是</span>
                      <else />
                      <span class="no" onClick="changeTableVal('dis_post','id','{$list.id}','recycle',this)" ><i class="fa fa-ban"></i>否</span>
                    </if>
                  </div>
                </td>     
                <td align="center" class="handle">
                    <div style="text-align: center; width: 170px; max-width:150px;">
                        <a class="btn blue" href="{:U('Admin/Discuz/det_community',array('id'=>$list['id']))}"><i class="fa fa-pencil-square-o"></i>编辑</a>
                        <!-- <a class="btn blue" href="{:U('Admin/Discuz/add_community',array('id'=>$list['id']))}"><i class="fa fa-pencil-square-o"></i>参加互动</a> -->
                        <a class="btn blue" href="{:U('Admin/Discuz/del_community',array('id'=>$list['id']))}"><i class="fa fa-pencil-square-o"></i>删除活动</a>
                    </div>
                </td>
                <td align="" class="" style="width: 100%;">
                    <div>&nbsp;</div>
                </td>
            </tr>
        </volist>
        </tbody>
    </table>
</div>
<!--分页位置-->
{$pager->show()}
<script>
    $(".pagination  a").click(function(){
        var page = $(this).data('p');
        ajax_get_table('search-form2',page);
    });
    $(document).ready(function(){
        // 表格行点击选中切换
        $('#flexigrid >table>tbody>tr').click(function(){
            $(this).toggleClass('trSelected');
        });
        $('#user_count').empty().html("{$pager->totalRows}");
    });
    function delfun(obj) {
        // 删除按钮
        layer.confirm('确认删除？', {
            btn: ['确定', '取消'] //按钮
        }, function () {
            $.ajax({
                type: 'post',
                url: $(obj).attr('data-url'),
                data: {id : $(obj).attr('data-id')},
                dataType: 'json',
                success: function (data) {
                    layer.closeAll();
                    if (data.status == 1) {
                        $(obj).parent().parent().parent().remove();
                    } else {
                        layer.alert(data.msg, {icon: 2});
                    }
                }
            })
        }, function () {
        });
    }
</script>